/**
 * Mock 服务入口文件
 * 统一管理所有 Mock 接口
 */

import { setupMockServer } from './server'
import userMocks from './api/user'
import musicMocks from './api/music'
import playlistMocks from './api/playlist'
import searchMocks from './api/search'

// 收集所有 Mock 接口
const mocks = [
  ...userMocks,
  ...musicMocks,
  ...playlistMocks,
  ...searchMocks
]

// 启动 Mock 服务
export function setupMocks() {
  if (import.meta.env.VITE_MOCK_ENABLED === 'true' && import.meta.env.DEV) {
    console.log('🚀 Mock 服务已启动')
    setupMockServer(mocks)
  }
}

export default mocks